solving equations with the distributive property on both sides